<template>
  <div id="app">
  <Myheader/>
  <keep-alive>
  <router-view v-if="$route.meta.keep"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keep"></router-view>
  <Myfooter v-show="$route.meta.show"/>
  </div>
</template>

<script>
import Myheader from './components/Header/index.vue'
import Myfooter from './components/Footer/index.vue'

export default {
  name: 'App',
  mounted(){
    //通知vuex发送请求，获取数据到仓库中
    this.$store.dispatch("categoryList");
  },
  components: {
    Myheader,
    Myfooter
  }
}
</script>

<style>

</style>
